<!--
 * @Author: your name
 * @Date: 2021-05-25 08:29:49
 * @LastEditTime: 2021-05-25 14:46:24
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \5.25\logo\src\views\Finally.vue
-->
<template>
  <div class="service">
    <div class="head">
      <span>
        <p>历史接待次数</p>
        <p>200</p>
      </span>
      <span>
        <p>历史接待次数</p>
        <p>200</p>
      </span>
      <span>
        <p>今日接待次数</p>
        <p>200</p>
      </span>
      <span>
        <p>今日接待次数</p>
        <p>200</p>
      </span>
    </div>
    <div class="main">
      <div class="min">
        <h4>数据列表</h4>
        <p>
          <span>添加</span>
          <select name="" id="">
            <option value="0">显示条数</option>
          </select>
          <select name="" id="">
            <option value="0">排序方式</option>
          </select>
        </p>
      </div>
      <div class="man">
        <ol class="ols">
          <li>成员账号</li>
          <li>客服昵称</li>
          <li>添加时间</li>
          <li>最后登录</li>
          <li>是否启用</li>
          <li>操作</li>
        </ol>
        <ul class="uls">
          <li v-for="(item, index) in List" :key="index">
            <p>{{ item.phone }}</p>
            <p>{{ item.name }}</p>
            <p>{{ item.date }}</p>
            <p>{{ item.area }}</p>
            <p>{{ item.job }}</p>
            <p>
              <span @click="BtnDetail">查看记录</span>
              <span @click="BtnBJ">编辑</span>
              <span>删除</span>
            </p>
          </li>
        </ul>
      </div>
    </div>
    <div class="mock" v-show="isShow">
      <div class="mock-h">
        <h4>添加客服</h4>
        <p @click="BtnGB">X</p>
      </div>
      <div class="mock-m">
        <p>客服昵称:<input type="text" /></p>
        <p>
          成员账号:<select name="" id="">
            <option value="0">选择部门</option>
            <option value="1">前端开发师</option>
            <option value="2">前端构架师</option>
          </select>
          <select name="" id="">
            <option value="0">选择成员</option>
            <option value="1">精英</option>
            <option value="2">大牛</option>
          </select>
        </p>
        <p>备注信息: <input type="text" /></p>
      </div>
      <div class="mock-f">
        <p @click="BtnGB">取消</p>
        <p>确定</p>
      </div>
    </div>
  </div>
</template>

<script>
import { mapState, mapActions } from "vuex";
export default {
  data() {
    return {
      isShow: false, //开关
    };
  },
  computed: {
    ...mapState(["List"]),
  },
  methods: {
    ...mapActions(["GetList"]),
    //跳详情页
    BtnDetail() {
      this.$router.push("/Detail");
    },
    //编辑
    BtnBJ() {
      this.isShow = true;
    },
    //关闭
    BtnGB() {
      this.isShow = false;
    },
  },
  created() {
    this.GetList();
  },
};
</script>

<style>
.service {
  width: 100%;
  height: 100%;
  position: relative;
}
.head {
  width: 100%;
  height: 100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
}
.head span {
  border: 1px solid #ccc;
  padding: 10px 30px;
}
.min {
  width: 100%;
  height: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
  background: #e6e6e6;
}
.ols {
  width: 100%;
  height: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 50px;
  border: 1px solid #ccc;
}
.uls li {
  width: 100%;
  height: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid orange;
}
.uls li p:nth-child(6) {
  color: green;
}
.uls li p:nth-child(6) span {
  margin: 0 5px;
}
.mock {
  width: 650px;
  height: 400px;
  background: rgba(0, 0, 0, 0.5);
  border: 3px solid #ccc;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 2px 3px 4px 5px gray;
}
.mock-h {
  width: 100%;
  height: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #e6e6e6;
  padding: 0 15px;
}
.mock-h p {
  font-size: 24px;
}
.mock-m {
  flex: 1;
  overflow-y: scroll;
  text-align: center;
  line-height: 80px;
}
.mock-f {
  width: 100%;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #e6e6e6;
}
.mock-f p {
  margin: 0 10px;
  border: 2px solid turquoise;
  padding: 5px 10px;
}
.mock-f p:nth-child(2) {
  background: greenyellow;
}
</style>